#!/bin/bash
rm -rf avalon.tar.gz
mvn clean package

mkdir avalon
mkdir avalon/avalon-erp
mkdir avalon/avalon-file
mkdir avalon/avalon-im
mkdir avalon/avalon-shop

cp avalon-erp/port8090-test.sh avalon/avalon-erp
cp avalon-erp/port8090-pro.sh avalon/avalon-erp
cp avalon-erp/target/avalon-server.jar avalon/avalon-erp

cp avalon-file/port8091-test.sh avalon/avalon-file
cp avalon-file/port8091-pro.sh avalon/avalon-file
cp avalon-file/target/avalon-file.jar avalon/avalon-file

cp avalon-im/port8093-test.sh avalon/avalon-im
cp avalon-im/port8093-pro.sh avalon/avalon-im
cp avalon-im/target/avalon-im.jar avalon/avalon-im

cp avalon-shop/port8094-test.sh avalon/avalon-shop
cp avalon-shop/port8094-pro.sh avalon/avalon-shop
cp avalon-shop/target/avalon-shop.jar avalon/avalon-shop

tar -zcvf avalon.tar.gz avalon
rm -rf avalon